#======================================================================
# Product:      KnowledgeEngine (Plone Version)
#
# File:         AbstractXMLRPCClient.py
#
# Copyright:    Copyright (c) 2006, Faulkner Technologies
#
# Author:       John Meredith
#
# Description:  Extend this for all XMLRPC based blog clients
#======================================================================


#======================================================================
# KnowledgeEngine Imports
#----------------------------------------------------------------------
from AbstractBlogClient import *

#======================================================================
# Zope Library Imports
#----------------------------------------------------------------------


#======================================================================
# Python Library Imports
#----------------------------------------------------------------------
import os
import sys
import unittest
import xmlrpclib


#======================================================================
# Class definition
#----------------------------------------------------------------------
class AbstractXMLRPCClient(AbstractBlogClient):
    """
        An abstract XMLRPC based client. To be extended.
    """

    # Some meta-data for the blog client
    TITLE = "AbstractXMLRPCClient"


    def getServer(self):
        """
            Get an instance of a XMLRPC server
        """
        
        self.checkAnonymous()
        
        return xmlrpclib.ServerProxy(self.serverURL)
    